package com.eastmelon.blog.service;

import java.io.InputStream;
import java.io.Serializable;
import java.util.List;

import com.eastmelon.basic.model.Pager;
import com.eastmelon.blog.entity.Article;
import com.eastmelon.blog.vo.DateCount;

public interface ArticleService {
	public Article get(Serializable id);					//只查询一个，常用于修改
	public void save(Article entity,InputStream is);					//插入，用实体作为参数
	public void update(Article entity,InputStream is,String oldImageName);					//修改，用实体作为参数
	public void deleteById(Serializable id);		//按id删除，删除一条；支持整数型和字符串类型ID
	public List<Article> find();
	public void deleteByIds(Serializable[] ids);//批量删除；支持整数型和字符串类型ID
	public String getOldImage(Serializable id);
	public List<Article> findAll();
	public Pager<Article> findPage();
	public List<DateCount> findDateCount();
	public Pager<Article> findByCategory(Serializable id);
	public Pager<Article> findByTags(Serializable id);
	public Pager<Article> findByDateCategory(String name);
	public Article getLastItem();
	public Article getPreItem(Serializable id);
	public Article getNextItem(Serializable id);
}
